﻿package mortal.game.view.task.drama.operations
{
    import Message.DB.Tables.*;
    import flash.utils.*;
    import mortal.game.scene3D.layer3D.utils.*;
    import mortal.game.scene3D.player.entity.*;

    public class TaskDramaNpcAction extends Object implements ITaskDramaStepCommand
    {

        public function TaskDramaNpcAction()
        {
            return;
        }// end function

        public function call(param1:TTaskDrama, param2:Function = null) : void
        {
            var data:* = param1;
            var callback:* = param2;
            var bossActionEnd:* = function () : void
            {
                if (callback != null)
                {
                    callback.apply();
                }
                return;
            }// end function
            ;
            var npc:* = ThingUtil.npcUtil.getNpc(data.entity);
            var repeat:* = data.valueOne == 1;
            if (npc != null)
            {
            }
            return;
        }// end function

        public function cancel(param1:TTaskDrama, param2:Function = null) : void
        {
            if (param2 != null)
            {
                param2.apply();
            }
            return;
        }// end function

        private function getBossByCode(param1:int) : MonsterPlayer
        {
            var _loc_3:IEntity = null;
            var _loc_4:TBoss = null;
            var _loc_2:* = ThingUtil.entityUtil.entitysMap.allEntitys;
            for each (_loc_3 in _loc_2)
            {
                
                if (_loc_3 is MonsterPlayer)
                {
                    _loc_4 = (_loc_3 as MonsterPlayer).bossInfo;
                    if (_loc_4.code == param1)
                    {
                        return _loc_3 as MonsterPlayer;
                    }
                }
            }
            return null;
        }// end function

        public function dispose() : void
        {
            return;
        }// end function

    }
}
